package singleton;

/**
 * 单例模式 - 双重校验锁
 * 
 * @author JasonWu
 * @version create time: 2017年7月23日 下午9:49:45
 */
public class Singleton5 {
	private volatile static Singleton5 singleton5;
	private Singleton5() {}
	public static Singleton5 getInstance() {
		if(singleton5 == null) {
			synchronized (Singleton5.class) {
				if (singleton5 == null) {
					singleton5 = new Singleton5();
				}
			}
		}
		return singleton5;
	}
}
